package cc.linker.steplink.crm.merchant.dao;

import cc.linker.steplink.crm.merchant.pojo.*;

import java.util.List;
import java.util.Map;

public interface AssetCenterMapper {

    AssetCenterOverViewPo getAssetCenterOverView(Map<String, Object> params);

    boolean saveRechargeRecord(RechargeRecordPo rechargeRecordPo);

    void saveRechargeVoucher(Map<String, Object> params);

    void updateRechargeType(Map<String, Object> params);

    Integer getBankCardNum(Map<String, Object> params);

    void addBankCard(BankCardPo bankCardPo);

    List<BankCardPo> getBankCardList(Map<String, Object> params);

    void updateBankCard(BankCardPo bankCardPo);

    void delBankCard(Map<String, Object> params);

    Integer getWithdrawCount(Map<String, Object> params);

    List<WithdrawInfoPo> getWithdrawList(Map<String, Object> params);

    void saveWithdraw(WithdrawInfoPo withdrawInfoPo);

    Integer getRechargeCount(Map<String, Object> params);

    List<RechargeRecordPo> getRechargeList(Map<String, Object> params);

    void rechargeReview(Map<String, Object> params);

    void withdrawReview(Map<String, Object> params);

    Integer getTransactionCount(Map<String, Object> params);

    List<TransactionDetailsPo> getTransactionDetails(Map<String, Object> params);

    UserAccountPo getMiniProgramAccount(Map<String, Object> params);

    List<UserAccountPo> getAdminAccounts();

    void accountSummaryStatistics(Map<String, Object> map);

    void updateRechargeAccountInfo(Map<String, Object> params);

    void insertRechargeTradeRecord(Map<String, Object> params);

    void updateWithdrawAccountInfo(Map<String, Object> params);

    void insertWithdrawTradeRecord(Map<String, Object> params);

    Integer getAccountSummaryCount(Map<String, Object> params);

    void setBankCardUndefault(Map<String, Object> params);

    void setDefaultBankCard(Map<String, Object> params);

    Integer ifSummaryStatistics(Map<String, Object> map);

    void updateSummaryStatistics(Map<String, Object> map);
    
    WithdrawInfoPo getWithdrawById(Long withdrawRecordId);
    
    RechargeRecordPo getRechargeById(Long rechargeId);

    /**
     * 获取机构列表
     * @return
     */
    List<String> listOrgcode();

    /**
     * 获取大B每日数据
     * @param params
     * @return
     */
    List<AccountSummaryPo> getAccountSummaryByDay(Map<String, Object> params);

    /**
     * 获取大B每月数据
     * @param params
     * @return
     */
    List<AccountSummaryPo> getAccountSummaryByMonth(Map<String, Object> params);

    /**
     * 账单明细
     * @param params
     * @return
     */
    List<TransactionDetailsPo> getTransactionDetailsNew(Map<String, Object> params);

    List<UserAccountPo> selectUnfreezeUserList(Map<String, Object> map);

    int updateAccountInfoByUid(UserAccountPo userAccountPo);

    int updateTradeInfo(Map<String, Object> map);

    /**
     * 获取小b每日数据
     * @param params
     * @return
     */
    List<AccountSummaryPo> getAccountSummarySalerByDay(Map<String, Object> params);

    /**
     * 获取小b每月数据
     * @param params
     * @return
     */
    List<AccountSummaryPo> getAccountSummarySalerByMonth(Map<String, Object> params);

    /**
     * 获取小b列表
     * @return
     */
    List<Map<String, Object>> listSalerIds();

    /**
     * 判断是否生成当日记录
     * @param map
     * @return
     */
    Integer ifSummaryStatisticsSaler(Map<String, Object> map);

    /**
     * 小b每日汇总保存
     * @param map
     */
    boolean accountSummaryStatisticsSaler(Map<String, Object> map);

    /**
     * 小b每日汇总更新
     * @param map
     */
    void updateSummaryStatisticsSaler(Map<String, Object> map);

    /**
     * 小b每日汇总保存，没有则插入空数据
     * @param map
     */
    void accountSummaryStatisticsSaler0(Map<String, Object> map);
}
